#include <stdio.h>
#include <stdlib.h>

int main()
{
	int n=0, i=0, a=0, b=1, c=0;
	float x=0;

	printf("Enter the base:");
	scanf("%f", &x);
	//if (scanf("%d", &n)!=1)
	//{
	//	printf("Incorrect base. Goodbye!\n");
	//	return -1;
	//}
	
	printf("Enter intenger power:");
	scanf("%d", &n);
	//if (scanf("%d", &n)!=1)
	//{
	//	printf("Incorrect power. Goodbye!\n");
	//	return -1;
	//}

	while (n!=1)
	{
		a=n%2;
		if (a==0) 	
		{
			n=n/2;
			x=x*x;	
		}
		else 
		{		
			n=n-1;
			b=x*b;
		}
		i++;
	}
	c=x*b;
	printf("answer %d", c);
	system("PAUSE");
}